package net.wexoo.onlinedivelog.proxy;

import java.util.List;

import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public abstract class AbstractProxy<T> implements IProxy<T> {

  @SuppressWarnings("unused")
  private static Logger log = LoggerFactory.getLogger(AbstractProxy.class);

  @Override
  public T saveOrUpdate(T entity) {
    return getDao().saveOrUpdate(entity);
  }

  @Override
  public boolean remove(T entity) {
    return getDao().delete(entity);
  }

  @Override
  public List<T> getAll() {
    return getDao().getAll();
  }

  @Override
  public List<T> getAll(SortParam sortParam, Integer first, Integer count) {
    return getDao().getAll(sortParam, first, count);
  }

  @Override
  public T getBeanById(int id) {
    return getDao().getBeanById(id);
  }

  @Override
  public Long getCount() {
    return getDao().getCount();
  }
}